import Vue from 'vue'
import Router from 'vue-router'
const home = resolve => require(['@/components/home'], resolve);


//患者管理
const patientList = resolve => require(['@/components/patientManage/patientList'], resolve)
const patientDetail = resolve => require(['@/components/patientManage/patientDetail'], resolve)
const recordList = resolve => require(['@/components/patientManage/recordList'], resolve)
const recordDetail = resolve => require(['@/components/patientManage/recordDetail'], resolve)

//出诊计划
const inquiryList = resolve => require(['@/components/inquiryPlan/inquiryList'], resolve)
const inquiryDetail = resolve => require(['@/components/inquiryPlan/inquiryDetail'], resolve)
const appointList = resolve => require(['@/components/inquiryPlan/appointList'], resolve)
const appointDetail = resolve => require(['@/components/inquiryPlan/appointDetail'], resolve)

//问诊单
const askList = resolve => require(['@/components/ask/askList'], resolve)
const askRecordList = resolve => require(['@/components/ask/askRecordList'], resolve)
const askDetail = resolve => require(['@/components/ask/askDetail'], resolve)

//随访复诊
const followList = resolve => require(['@/components/follow/followList'], resolve)
const followRecordList = resolve => require(['@/components/follow/followRecordList'], resolve)
const followDetail = resolve => require(['@/components/follow/followDetail'], resolve)

//个人中心
const me = resolve => require(['@/components/myCenter/me'], resolve)
const editInfo = resolve => require(['@/components/myCenter/editInfo'], resolve)
const myCode = resolve => require(['@/components/myCenter/myCode'], resolve)
const certificateEdit = resolve => require(['@/components/myCenter/certificateEdit'], resolve)
const organizationEdit = resolve => require(['@/components/myCenter/organizationEdit'], resolve)
const feedback = resolve => require(['@/components/myCenter/feedback'], resolve)
const changePassword = resolve => require(['@/components/myCenter/changePassword'], resolve)
const recommend = resolve => require(['@/components/myCenter/recommend'], resolve)
const myCertification = resolve => require(['@/components/myCenter/myCertification'], resolve)
const bindMobile = resolve => require(['@/components/myCenter/bindMobile'], resolve)

//活动
const activity = resolve => require(['@/components/activity/activity'], resolve)
const activityDetail = resolve => require(['@/components/activity/activityDetail'], resolve)

//登录
const login = resolve => require(['@/components/loginManage/login'], resolve)
const forget = resolve => require(['@/components/loginManage/forget'], resolve)
const forgetEmail = resolve => require(['@/components/loginManage/forgetEmail'], resolve)
const register = resolve => require(['@/components/loginManage/register'], resolve)
const emailRegister = resolve => require(['@/components/loginManage/emailRegister'], resolve)

const hospitalDetail = resolve => require(['@/components/hospitalDetail'], resolve);
const hospitalAdvice = resolve => require(['@/components/hospitalAdvice'], resolve);

Vue.use(Router)

export default new Router({
  // mode: 'history',
  // base:'/wechat',
  routes: [
    {
      path: '/',
      name: 'home',
      meta: {
        title: '首页'
      },
      component: home
    },
    {
      path: '/activity',
      name: 'activity',
      meta: {
        title: '活动'
      },
      component: activity
    },
    {
      path: '/me',
      name: 'me',
      meta: {
        title: '我的'
      },
      component: me
    },
    {
      path: '/patient/manage',
      name: 'patientList',
      meta: {
        title: '患者管理'
      },
      component: patientList
    },
    {
      path: '/patient/detail',
      name: 'patientDetail',
      meta: {
        title: ''
      },
      component: patientDetail
    },
    {
      path: '/patient/record/list',
      name: 'recordList',
      meta: {
        title: '病例列表'
      },
      component: recordList
    },
    {
      path: '/patient/record/detail',
      name: 'recordDetail',
      meta: {
        title: '病例'
      },
      component: recordDetail
    },
    {
      path: '/inquiry/list',
      name: 'inquiryList',
      meta: {
        title: '出诊计划'
      },
      component: inquiryList
    },
    {
      path: '/inquiry/detail',
      name: 'inquiryDetail',
      meta: {
        title: '出诊详情'
      },
      component: inquiryDetail
    },
    {
      path: '/inquiry/appoint/list',
      name: 'appointList',
      meta: {
        title: '出诊时间详情'
      },
      component: appointList
    },
    {
      path: '/inquiry/appoint/detail',
      name: 'appointDetail',
      meta: {
        title: '预约详情'
      },
      component: appointDetail
    },
    {
      path: '/ask/list',
      name: 'askList',
      meta: {
        title: '问诊单'
      },
      component: askList
    },
    {
      path: '/ask/detail',
      name: 'askDetail',
      meta: {
        title: '问诊单详情'
      },
      component: askDetail
    },
    {
      path: '/ask/record/list',
      name: 'askRecordList',
      meta: {
        title: '问诊单列表'
      },
      component: askRecordList
    },
    {
      path: '/follow/list',
      name: 'followList',
      meta: {
        title: '随访复诊'
      },
      component: followList
    },
    {
      path: '/follow/detail',
      name: 'followDetail',
      meta: {
        title: '随访复诊详情'
      },
      component: followDetail
    },
    {
      path: '/follow/record/list',
      name: 'followRecordList',
      meta: {
        title: '随访复诊列表'
      },
      component: followRecordList
    },
    {
      path: '/editInfo',
      name: 'editInfo',
      meta: {
        title: '个人信息'
      },
      component: editInfo
    },
    {
      path: '/myCode',
      name: 'myCode',
      meta: {
        title: '我的二维码'
      },
      component: myCode
    },
    {
      path: '/certificateEdit',
      name: 'certificateEdit',
      meta: {
        title: '认证'
      },
      component: certificateEdit
    },
    {
      path: '/organization/edit',
      name: 'organizationEdit',
      meta: {
        title: '机构认证页面'
      },
      component: organizationEdit
    },
    {
      path: '/feedback',
      name: 'feedback',
      meta: {
        title: '意见反馈'
      },
      component: feedback
    },
    {
      path: '/activityDetail',
      name: 'activityDetail',
      meta: {
        title: '活动详情'
      },
      component: activityDetail
    },
    {
      path: '/changePassword',
      name: 'changePassword',
      meta: {
        title: '修改密码'
      },
      component: changePassword
    },
    {
      path: '/login',
      name: 'login',
      meta: {
        title: '登录'
      },
      component: login
    },
    {
      path: '/forget',
      name: 'forget',
      meta: {
        title: '重置密码'
      },
      component: forget
    },
    {
      path: '/forgetEmail',
      name: 'forgetEmail',
      meta: {
        title: '重置密码'
      },
      component: forgetEmail
    },
    {
      path: '/register',
      name: 'register',
      meta: {
        title: '注册'
      },
      component: register
    },
    {
      path: '/emailRegister',
      name: 'emailRegister',
      meta: {
        title: '注册'
      },
      component: emailRegister
    },
    {
      path: '/recommend',
      name: 'recommend',
      meta: {
        title: '推荐有礼'
      },
      component: recommend
    },
    {
      path: '/myCertification',
      name: 'myCertification',
      meta: {
        title: '我的认证'
      },
      component: myCertification
    },
    {
      path: '/bindMobile',
      name: 'bindMobile',
      meta: {
        title: '修改绑定'
      },
      component: bindMobile
    },
    {
      path: '/hospitalDetail',
      name: 'hospitalDetail',
      meta: {
        title: '医生招募'
      },
      component: hospitalDetail
    },
    {
      path: '/hospitalAdvice',
      name: 'hospitalAdvice',
      meta: {
        title: '医疗机构招募'
      },
      component: hospitalAdvice
    },
    
  ]
})
